# Contributor: Nathan Caldwell <saintdev@gmail.com>
# Maintainer: Nathan Caldwell <saintdev@gmail.com>
# NOTE: For now we must use vendored libfuse, see the URL below for details.
#       https://github.com/trapexit/mergerfs/blob/2.27.0/README.md#why-was-libfuse-embedded-into-mergerfs
pkgname=mergerfs
pkgver=2.29.0
pkgrel=0
pkgdesc="A FUSE based union filesystem"
url="https://github.com/trapexit/mergerfs"
arch="all"
license="ISC"
depends="libattr fuse"
makedepends="autoconf automake libtool gettext-dev attr-dev linux-headers"
options="suid !check" # No test suite
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/trapexit/mergerfs/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	echo "$pkgver" > "$builddir"/VERSION
}

build() {
	export GIT_CEILING_DIRECTORIES="$srcdir"
	make OPTS="$CXXFLAGS"
}

package() {
	make PREFIX="/usr" DESTDIR="$pkgdir" install
}

sha512sums="2c21dedffc2f261c6c8427af59cffcacacc9b67bce7bb9989bd5946aa645c68bac0f56250ec19710e586a00892f7198853390bea3ff5981035d5a492ae4569a2  mergerfs-2.29.0.tar.gz"
